<?php 
include "includes/session.php";
include "includes/comunes.php";



?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta HTTP-EQUIV="refresh" CONTENT="300"/>
<title>Sistema de Registro de Atencion</title>

<link href="estilos.css" rel="stylesheet" type="text/css" />

<!--libreria jquery central-->

<script src="jquery-ui/js/jquery-1.9.1.js"></script>
<!--fin libreria central-->

<!--Librerias para el combo-->
<script language="JavaScript" type="text/javascript" src="combos/jquery.chainedSelects.js"></script>
<!--fin libreria-->

<!--librerias ui-->
<link href="jquery-ui/css/ui-lightness/jquery-ui-1.10.2.custom.css" rel="stylesheet"/>
<script src="jquery-ui/js/jquery-ui-1.10.2.custom.js"></script>
<!--fin libreria-->
<!--libreria flexigrid-->
<link rel="stylesheet" type="text/css" href="jquery-ui/css/ui-flexigrid/flexigrid.css">
    <script type="text/javascript" src="jquery-ui/js/flexigrid.js"></script>
<!--fin libreria-->
<!--VENTANA MODAL -->
<link href="modal/styles/modal-window.css" type="text/css" rel="stylesheet" /> 
 
		<script type="text/javascript" language="javascript" src="modal/scripts/modal-window.min.js"></script>  


<script language="JavaScript" type="text/javascript">
$(function()
{

    //   funcion que implementa combos
	$('#rubro').chainSelect('#subrubro','combosubrubro.php',
	{
		before:function (target) //before request hide the target combobox and display the loading message
		{
			$("#loading").css("display","block");
			$(target).css("display","none");
		},
		after:function (target) //after request show the target combobox and hide the loading message
		{
			$("#loading").css("display","none");
			$(target).css("display","inline");
		}
	});
      // fin funcion

//          funcion datapicker

$( "#codigoDesde" ).autocomplete({
			source: "autoArticulo.php",
			minLength: 2,
                select: function(event, ui) {
					$("#codigoDesde<?php echo $a?>").val(ui.item.value);
		
                }
		});

$( "#codigoHasta" ).autocomplete({
			source: "autoArticulo.php",
			minLength: 2,
                select: function(event, ui) {
					$("#codigoHasta<?php echo $a?>").val(ui.item.value);
		
                }
		});		

		  $( "#fecha" ).datepicker({
         dateFormat: "yy-mm-dd"

      });
       $( "#fechah" ).datepicker({
         dateFormat: "yy-mm-dd"
      });
	  
	  $( "#menu" ).menu({position: {at: "left bottom"}});
});
</script>



</head>

<body>

<div class="container">
<?php include "includes/head.php"?>
   <div class="content">
       <div class="tituloprincipal"><img src="img/impresionMasiva.jpg" width="25" height="25" border="0"/> Impresion Masiva
           <?php include 'includes/submenu.php';?>  
           </div>
       
       <div class="contenedorpedido">
       <form id="altapedido" name="altapedido" method="GET" action="ImprimirEtiquetasMasivas.php">
        <fieldset>
             <legend><b>Seleccione Filtros</b></legend>
             <table>
                 <tr>

                    <td class="textotablamenuform">Codigo Desde</td>
                    <td class="textotablamenuform"><input type="text" name="codigoDesde" id="codigoDesde" value="" class="campo_form" /></td>

                     
                 </tr>
                 <tr>
                     <td class="textotablamenuform">Rubro</td>
                     <td class="textotablamenuform">
                        <select name="rubro" id="rubro" class="campo_form">
                             <option selected value="0">Todos...</option>
                             <?php
                             $ped=obtener_rubros();

                             while($regPed=mysql_fetch_array($ped)){
                                 
                                       echo "<option value='".utf8_encode($regPed['ArticuloRubro'])."'>".utf8_encode($regPed['ArticuloRubro'])."</option>";


                             }

                             ?>

                         </select>
                     </td>
                     <td class="textotablamenuform">Sub Rubro</td>
                     <td class="textotablamenuform">
                          <select name="subrubro" id="subrubro" class="campo_form" style="display:none;">
                            <option selected value="0">Todos...</option>
                             <?php
                             $ped=obtener_sub_rubros();

                             while($regPed=mysql_fetch_array($ped)){
//                                 if($regPed['sucursalId']==$_SESSION['usuSucursal'])
//                                   echo "<option value='".utf8_encode($regPed['sucursalId'])."' selected>".utf8_encode($regPed['sucursalNombre'])." (".utf8_encode($regPed['sucursalCodigo']).")</option>";
//                                 else
                                      echo "<option value='".utf8_encode($regPed['ArticuloSubRubro'])."'>".utf8_encode($regPed['ArticuloSubRubro'])."</option>";


                             }

                             ?>

                         </select>
                     </td>
                     
                 </tr>
                 <tr><td class="textotablamenuform">Fecha Mod. Desde</td>
                     <td class="textotablamenuform"><input type="text" name="fecha" id="fecha" value="" class="campo_form" /></td>
                    <td class="textotablamenuform">Fecha Mod. Hasta</td>
					<td class="textotablamenuform"><input type="text" name="fechah" id="fechah" value="" class="campo_form" /></td>
                 
                        </tr>
                 <tr>
                    <td class="textotablamenuform">Proveedor</td>
                    <td class="textotablamenuform" colspan="3">
					 <select name="proveedor" id="proveedor" class="campo_form">
                            <option selected value="0">Todos...</option>
                             <?php
                             $ped=obtener_proveedores_codigos();

                             while($regPed=mysql_fetch_array($ped)){
//                                 if($regPed['sucursalId']==$_SESSION['usuSucursal'])
//                                   echo "<option value='".utf8_encode($regPed['sucursalId'])."' selected>".utf8_encode($regPed['sucursalNombre'])." (".utf8_encode($regPed['sucursalCodigo']).")</option>";
//                                 else
                                      echo "<option value='".utf8_encode($regPed['ProveedorId'])."'>".utf8_encode($regPed['ProveedorNombre'])."</option>";


                             }

                             ?>

                         </select>
					
					</td>
					 </tr>
                   <tr>
					<td class="textotablamenuform">% Descuento</td>
                      <td class="textotablamenuform"><input type="number" step="0.01" name="descuento" id="descuento" value="" class="campo_form" /></td>
                    
                 </tr>
                   <tr>
                    <td class="textotablamenuform" style="text-align: right;" colspan="8">
                         <input type="reset" name="enviar" value="Limpiar"  class="boton_form"/>
                         <input name="submit" id="submit" type="submit" value="Listar y Seleccionar" class="boton_form"/>
                     </td>
                 </tr>
             </table>
        </fieldset>
       </form>
   
           
       </div>
 
       <div class="clear"></div>
   <br>
   </div>
  <?php include "includes/pie.php"?>
  
</div>


</body>
</html>
